import Vue from 'vue';
import Router from 'vue-router';
import LandingPage from '../views/LandingPage'

Vue.use(Router);

export default new Router({
  routes: [
    {
      path: '/',
      name: 'landing-page',
      component: LandingPage,
    },
    {
      path: '/repos',
      name: 'repo-page',
      // route level code-splitting
      // this generates a separate chunk (repo-page.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () =>
        import(/* webpackChunkName: "repo-page" */ '../views/RepoPage'),
    },
    {
      path: '/test/global-test1',
      name: 'global-test1',
      component: () =>
        import(/* webpackChunkName: "repo-page" */ '../views/TestPage/TestPage1.vue'),
    },  
    {
      path: '/test/global-test2/:id',
      name: 'global-test2',
      component: () =>
        import(/* webpackChunkName: "repo-page" */ '../views/TestPage/TestPage2.vue'),
    },  
    {
      path: '/test/global-test3',
      name: 'global-test3',
      component: () =>
        import(/* webpackChunkName: "repo-page" */ '../views/TestPage/TestPage3.vue'),
    },       
    {
      path: '/test/user-link1',
      name: 'user-link1-page',
      component: () =>
        import(/* webpackChunkName: "repo-page" */ '../views/RepoPage/RepoStore.vue'),
    },        
    {
      path: '*',
      name: '404',
      component: () =>
        import(/* webpackChunkName: "repo-page" */ '../views/ErrorPage/404.vue'),
    },      
  ],
});
